package cn.gson.fengboot.model.pojos;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

public class QrolesmenuPK implements Serializable {
    private int meId;
    private int roleId;

    @Column(name = "me_id")
    @Id
    public int getMeId() {
        return meId;
    }

    public void setMeId(int meId) {
        this.meId = meId;
    }

    @Column(name = "role_id")
    @Id
    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        QrolesmenuPK that = (QrolesmenuPK) o;
        return meId == that.meId &&
                roleId == that.roleId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(meId, roleId);
    }
}
